<?php

namespace common\models\wap;

use Yii;

/**
 * This is the model class for table "iliketry.w_token".
 *
 * @property integer $id
 * @property string $token
 * @property integer $expires
 */
class WeiXinToken extends \yii\db\ActiveRecord
{
    public static function getDb()
    {
        return Yii::$app->get('db_weixin');
    }

    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'weixin.w_token';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['expires'], 'integer'],
            [['token'], 'string', 'max' => 600],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'token' => 'Token',
            'expires' => 'Expires',
        ];
    }
}
